package org.dromara.tearoom.domain.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;
import org.dromara.common.core.enums.ArrayValuable;

import java.util.Arrays;

/**
 * 优惠劵范围类型
 *
 * @author ckj
 */
@AllArgsConstructor
@Getter
public enum CouponProductScopeTypeEnum implements ArrayValuable<Integer> {

    TY(1, "通用卷"),
    MD(2, "门店卷"),
    SP(3, "商品卷");

    public static final Integer[] ARRAYS = Arrays.stream(values()).map(CouponProductScopeTypeEnum::getType).toArray(Integer[]::new);

    /**
     * 值
     */
    private final Integer type;
    /**
     * 名字
     */
    private final String name;

    @Override
    public Integer[] array() {
        return ARRAYS;
    }



}
